#ifndef _TASKQUEUE__H
#define _TASKQUEUE__H
#include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>
using namespace std;

class TaskQueue{
    private:
    int _capacity;
    queue<int> _que;
    mutex _mutex;
    condition_variable _notEmpty;
    condition_variable _notFull;

    public:
    TaskQueue(int capacity)
    :_capacity(capacity)
    ,_que()
    ,_mutex()
    ,_notEmpty()
    ,_notFull()
    {}
    ~TaskQueue(){}
    void push(const int &);
    int pop();
    bool empty();
    bool full();
};

#endif

